<?php if($result){ ?>
{
    "connected" : true,
    "now" : <?php echo $now; ?>,
    "expire" : <?php echo $expire; ?>,
    "isPlaying" : false
}
<?php } else { ?>
{   
    "connected" : false
}
<?php } ?>